/**
 * Created by yuming619 on 2016/10/21.
 */
//rem适配手机大小�
new function (){
    var _self = this;
    _self.width = 640;//�
    _self.fontSize = 100;//
    _self.widthProportion = function(){var p = (document.body&&document.body.clientWidth||document.getElementsByTagName("html")[0].offsetWidth)/_self.width;return p>1?1:p<0.5?0.5:p;};
    _self.changePage = function(){
        document.getElementsByTagName("html")[0].setAttribute("style","font-size:"+_self.widthProportion()*_self.fontSize+"px !important");
    }
    _self.changePage();
    window.addEventListener('resize',function(){_self.changePage();},false);
};

//菜单样式

function change1(obj){
    $(".menu_a").removeClass("menu_a");
    $(".menu_li").removeClass("menu_li");
    var arrA = $(obj).children('a');
    $(obj).addClass("menu_li");
    $(arrA[0]).addClass("menu_a");;
}
//function change2(obj){
//    $(".active").removeClass("active");
//    var arrA = $(obj).children('a');
//    $(arrA[0]).addClass("active");
//}


//餐政服务购买显示隐藏
function click_show1(b,c){
 if ($(c).val() == 0) {
  $(b).show()
   $(c).val(1)
   }else {
   $(b).hide()
      $(c).val(0)
   }
};